package com.cda.controller;

import com.cda.common.BaseLogger;
import com.cda.entity.Person;
import com.cda.service.FaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/cbc")
public class CBCController extends BaseLogger {


	@Autowired
	FaceService faceService;

	@RequestMapping(value="/photo",method = RequestMethod.GET)
	@ResponseBody
	public String photo(){

		Person p = new Person();
		p.setId("001");//ID,验证人员唯一性的字段作
		p.setName("人脸识别成功");//人员的名字
		p.setIC_NO("1001");//为维根号发送到闸机
		p.setID_NO("4409231991064444111");//	员工身份证号
		faceService.photograph(p);

		return null;
	}


	@RequestMapping(value="/listRecord",produces="application/json;charset=utf-8",method = RequestMethod.POST)
	@ResponseBody
	public String listRecord(String listRecord){

		logger.info("执行解析人脸识别回调函数");
		System.out.println(listRecord);

		return null;
	}



}